Commit
28ca96064bcb added support for setting PopupImageMenuItem's icons
via GIcons as well as via strings. However as the check whether an object
implements the GIcon interface only works on GObjects, specifying an icon
name was broken. Fix that to actually allow both strings and GIcons.
https://bugzilla.gnome.org/show_bug.cgi?id=789018
setIcon: function(icon) {
// The 'icon' parameter can be either a Gio.Icon or a string.
- if (GObject.type_is_a(icon, Gio.Icon))
+ if (icon instanceof GObject.Object && GObject.type_is_a(icon, Gio.Icon))
this._icon.gicon = icon;
else
this._icon.icon_name = icon;